3.619 \(\int \frac {(f+g x)^2 \sqrt {1-x^2}}{(1-x)^4} \, dx\)

Optimal. Leaf size=80 \[ \frac {(x+1)^4 (f+g)^2}{5 \left (1-x^2\right )^{5/2}}+\frac {(x+1)^3 (f-9 g) (f+g)}{15 \left (1-x^2\right )^{3/2}}+\frac {2 g^2 (x+1)}{\sqrt {1-x^2}}-g^2 \sin ^{-1}(x) \]

[Out]

1/5*(f+g)^2*(1+x)^4/(-x^2+1)^(5/2)+1/15*(f-9*g)*(f+g)*(1+x)^3/(-x^2+1)^(3/2)-g^2*arcsin(x)+2*g^2*(1+x)/(-x^2+1
)^(1/2)

________________________________________________________________________________________

Rubi [A]  time = 0.14, antiderivative size = 80, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, integrand size = 26, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.192, Rules used = {853, 1635, 789, 653, 216} \[ \frac {(x+1)^4 (f+g)^2}{5 \left (1-x^2\right )^{5/2}}+\frac {(x+1)^3 (f-9 g) (f+g)}{15 \left (1-x^2\right )^{3/2}}+\frac {2 g^2 (x+1)}{\sqrt {1-x^2}}-g^2 \sin ^{-1}(x) \]

Antiderivative was successfully verified.

[In]

Int[((f + g*x)^2*Sqrt[1 - x^2])/(1 - x)^4,x]

[Out]

((f + g)^2*(1 + x)^4)/(5*(1 - x^2)^(5/2)) + ((f - 9*g)*(f + g)*(1 + x)^3)/(15*(1 - x^2)^(3/2)) + (2*g^2*(1 + x
))/Sqrt[1 - x^2] - g^2*ArcSin[x]

Rule 216

Int[1/Sqrt[(a_) + (b_.)*(x_)^2], x_Symbol] :> Simp[ArcSin[(Rt[-b, 2]*x)/Sqrt[a]]/Rt[-b, 2], x] /; FreeQ[{a, b}
, x] && GtQ[a, 0] && NegQ[b]

Rule 653

Int[((d_) + (e_.)*(x_))^2*((a_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> Simp[(e*(d + e*x)*(a + c*x^2)^(p + 1))/(c*(
p + 1)), x] - Dist[(e^2*(p + 2))/(c*(p + 1)), Int[(a + c*x^2)^(p + 1), x], x] /; FreeQ[{a, c, d, e, p}, x] &&
EqQ[c*d^2 + a*e^2, 0] &&  !IntegerQ[p] && LtQ[p, -1]

Rule 789

Int[((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_))*((a_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> Simp[((d*g + e*f)*
(d + e*x)^m*(a + c*x^2)^(p + 1))/(2*c*d*(p + 1)), x] - Dist[(e*(m*(d*g + e*f) + 2*e*f*(p + 1)))/(2*c*d*(p + 1)
), Int[(d + e*x)^(m - 1)*(a + c*x^2)^(p + 1), x], x] /; FreeQ[{a, c, d, e, f, g}, x] && EqQ[c*d^2 + a*e^2, 0]
&& LtQ[p, -1] && GtQ[m, 0]

Rule 853

Int[((d_) + (e_.)*(x_))^(m_)*((f_) + (g_.)*(x_))^(n_)*((a_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> Dist[d^(2*m)/a^
m, Int[((f + g*x)^n*(a + c*x^2)^(m + p))/(d - e*x)^m, x], x] /; FreeQ[{a, c, d, e, f, g, n, p}, x] && NeQ[e*f
- d*g, 0] && EqQ[c*d^2 + a*e^2, 0] &&  !IntegerQ[p] && ILtQ[m, 0] && IntegerQ[n]

Rule 1635

Int[(Pq_)*((d_) + (e_.)*(x_))^(m_.)*((a_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> With[{Q = PolynomialQuotient[Pq,
a*e + c*d*x, x], f = PolynomialRemainder[Pq, a*e + c*d*x, x]}, -Simp[(d*f*(d + e*x)^m*(a + c*x^2)^(p + 1))/(2*
a*e*(p + 1)), x] + Dist[d/(2*a*(p + 1)), Int[(d + e*x)^(m - 1)*(a + c*x^2)^(p + 1)*ExpandToSum[2*a*e*(p + 1)*Q
 + f*(m + 2*p + 2), x], x], x]] /; FreeQ[{a, c, d, e}, x] && PolyQ[Pq, x] && EqQ[c*d^2 + a*e^2, 0] && ILtQ[p +
 1/2, 0] && GtQ[m, 0]

Rubi steps

\begin {align*} \int \frac {(f+g x)^2 \sqrt {1-x^2}}{(1-x)^4} \, dx &=\int \frac {(1+x)^4 (f+g x)^2}{\left (1-x^2\right )^{7/2}} \, dx\\ &=\frac {(f+g)^2 (1+x)^4}{5 \left (1-x^2\right )^{5/2}}-\frac {1}{5} \int \frac {(1+x)^3 \left (-f^2+8 f g+4 g^2+5 g^2 x\right )}{\left (1-x^2\right )^{5/2}} \, dx\\ &=\frac {(f+g)^2 (1+x)^4}{5 \left (1-x^2\right )^{5/2}}+\frac {(f-9 g) (f+g) (1+x)^3}{15 \left (1-x^2\right )^{3/2}}+g^2 \int \frac {(1+x)^2}{\left (1-x^2\right )^{3/2}} \, dx\\ &=\frac {(f+g)^2 (1+x)^4}{5 \left (1-x^2\right )^{5/2}}+\frac {(f-9 g) (f+g) (1+x)^3}{15 \left (1-x^2\right )^{3/2}}+\frac {2 g^2 (1+x)}{\sqrt {1-x^2}}-g^2 \int \frac {1}{\sqrt {1-x^2}} \, dx\\ &=\frac {(f+g)^2 (1+x)^4}{5 \left (1-x^2\right )^{5/2}}+\frac {(f-9 g) (f+g) (1+x)^3}{15 \left (1-x^2\right )^{3/2}}+\frac {2 g^2 (1+x)}{\sqrt {1-x^2}}-g^2 \sin ^{-1}(x)\\ \end {align*}

________________________________________________________________________________________

Mathematica [C]  time = 0.14, size = 91, normalized size = 1.14 \[ \frac {\sqrt {1-x^2} \left ((x+1)^{3/2} \left (f^2 (x-4)+f g (2-8 x)+g^2 (x-4)\right )-20 \sqrt {2} g^2 (x-1) \, _2F_1\left (-\frac {3}{2},-\frac {3}{2};-\frac {1}{2};\frac {1-x}{2}\right )\right )}{15 (x-1)^3 \sqrt {x+1}} \]

Antiderivative was successfully verified.

[In]

Integrate[((f + g*x)^2*Sqrt[1 - x^2])/(1 - x)^4,x]

[Out]

(Sqrt[1 - x^2]*((f*g*(2 - 8*x) + f^2*(-4 + x) + g^2*(-4 + x))*(1 + x)^(3/2) - 20*Sqrt[2]*g^2*(-1 + x)*Hypergeo
metric2F1[-3/2, -3/2, -1/2, (1 - x)/2]))/(15*(-1 + x)^3*Sqrt[1 + x])

________________________________________________________________________________________

fricas [B]  time = 1.22, size = 193, normalized size = 2.41 \[ \frac {2 \, {\left (2 \, f^{2} - f g + 12 \, g^{2}\right )} x^{3} - 6 \, {\left (2 \, f^{2} - f g + 12 \, g^{2}\right )} x^{2} - 4 \, f^{2} + 2 \, f g - 24 \, g^{2} + 6 \, {\left (2 \, f^{2} - f g + 12 \, g^{2}\right )} x + 30 \, {\left (g^{2} x^{3} - 3 \, g^{2} x^{2} + 3 \, g^{2} x - g^{2}\right )} \arctan \left (\frac {\sqrt {-x^{2} + 1} - 1}{x}\right ) + {\left ({\left (f^{2} - 8 \, f g - 39 \, g^{2}\right )} x^{2} - 4 \, f^{2} + 2 \, f g - 24 \, g^{2} - 3 \, {\left (f^{2} + 2 \, f g - 19 \, g^{2}\right )} x\right )} \sqrt {-x^{2} + 1}}{15 \, {\left (x^{3} - 3 \, x^{2} + 3 \, x - 1\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((g*x+f)^2*(-x^2+1)^(1/2)/(1-x)^4,x, algorithm="fricas")

[Out]

1/15*(2*(2*f^2 - f*g + 12*g^2)*x^3 - 6*(2*f^2 - f*g + 12*g^2)*x^2 - 4*f^2 + 2*f*g - 24*g^2 + 6*(2*f^2 - f*g +
12*g^2)*x + 30*(g^2*x^3 - 3*g^2*x^2 + 3*g^2*x - g^2)*arctan((sqrt(-x^2 + 1) - 1)/x) + ((f^2 - 8*f*g - 39*g^2)*
x^2 - 4*f^2 + 2*f*g - 24*g^2 - 3*(f^2 + 2*f*g - 19*g^2)*x)*sqrt(-x^2 + 1))/(x^3 - 3*x^2 + 3*x - 1)

________________________________________________________________________________________

giac [B]  time = 0.35, size = 266, normalized size = 3.32 \[ -g^{2} \arcsin \relax (x) + \frac {2 \, {\left (4 \, f^{2} - 2 \, f g + 24 \, g^{2} + \frac {5 \, f^{2} {\left (\sqrt {-x^{2} + 1} - 1\right )}}{x} - \frac {10 \, f g {\left (\sqrt {-x^{2} + 1} - 1\right )}}{x} + \frac {105 \, g^{2} {\left (\sqrt {-x^{2} + 1} - 1\right )}}{x} + \frac {25 \, f^{2} {\left (\sqrt {-x^{2} + 1} - 1\right )}^{2}}{x^{2}} + \frac {10 \, f g {\left (\sqrt {-x^{2} + 1} - 1\right )}^{2}}{x^{2}} + \frac {165 \, g^{2} {\left (\sqrt {-x^{2} + 1} - 1\right )}^{2}}{x^{2}} + \frac {15 \, f^{2} {\left (\sqrt {-x^{2} + 1} - 1\right )}^{3}}{x^{3}} - \frac {30 \, f g {\left (\sqrt {-x^{2} + 1} - 1\right )}^{3}}{x^{3}} + \frac {75 \, g^{2} {\left (\sqrt {-x^{2} + 1} - 1\right )}^{3}}{x^{3}} + \frac {15 \, f^{2} {\left (\sqrt {-x^{2} + 1} - 1\right )}^{4}}{x^{4}} + \frac {15 \, g^{2} {\left (\sqrt {-x^{2} + 1} - 1\right )}^{4}}{x^{4}}\right )}}{15 \, {\left (\frac {\sqrt {-x^{2} + 1} - 1}{x} + 1\right )}^{5}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((g*x+f)^2*(-x^2+1)^(1/2)/(1-x)^4,x, algorithm="giac")

[Out]

-g^2*arcsin(x) + 2/15*(4*f^2 - 2*f*g + 24*g^2 + 5*f^2*(sqrt(-x^2 + 1) - 1)/x - 10*f*g*(sqrt(-x^2 + 1) - 1)/x +
 105*g^2*(sqrt(-x^2 + 1) - 1)/x + 25*f^2*(sqrt(-x^2 + 1) - 1)^2/x^2 + 10*f*g*(sqrt(-x^2 + 1) - 1)^2/x^2 + 165*
g^2*(sqrt(-x^2 + 1) - 1)^2/x^2 + 15*f^2*(sqrt(-x^2 + 1) - 1)^3/x^3 - 30*f*g*(sqrt(-x^2 + 1) - 1)^3/x^3 + 75*g^
2*(sqrt(-x^2 + 1) - 1)^3/x^3 + 15*f^2*(sqrt(-x^2 + 1) - 1)^4/x^4 + 15*g^2*(sqrt(-x^2 + 1) - 1)^4/x^4)/((sqrt(-
x^2 + 1) - 1)/x + 1)^5

________________________________________________________________________________________

maple [A]  time = 0.02, size = 125, normalized size = 1.56 \[ \left (-\arcsin \relax (x )+\frac {\left (-2 x -\left (x -1\right )^{2}+2\right )^{\frac {3}{2}}}{\left (x -1\right )^{2}}+\sqrt {-2 x -\left (x -1\right )^{2}+2}\right ) g^{2}+\frac {2 \left (f +g \right ) \left (-2 x -\left (x -1\right )^{2}+2\right )^{\frac {3}{2}} g}{3 \left (x -1\right )^{3}}+\left (f^{2}+2 f g +g^{2}\right ) \left (\frac {\left (-2 x -\left (x -1\right )^{2}+2\right )^{\frac {3}{2}}}{5 \left (x -1\right )^{4}}-\frac {\left (-2 x -\left (x -1\right )^{2}+2\right )^{\frac {3}{2}}}{15 \left (x -1\right )^{3}}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((g*x+f)^2*(-x^2+1)^(1/2)/(1-x)^4,x)

[Out]

2/3*g*(f+g)/(x-1)^3*(-(x-1)^2-2*x+2)^(3/2)+g^2*(1/(x-1)^2*(-(x-1)^2-2*x+2)^(3/2)+(-(x-1)^2-2*x+2)^(1/2)-arcsin
(x))+(f^2+2*f*g+g^2)*(1/5/(x-1)^4*(-(x-1)^2-2*x+2)^(3/2)-1/15/(x-1)^3*(-(x-1)^2-2*x+2)^(3/2))

________________________________________________________________________________________

maxima [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {{\left (g x + f\right )}^{2} \sqrt {-x^{2} + 1}}{{\left (x - 1\right )}^{4}}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((g*x+f)^2*(-x^2+1)^(1/2)/(1-x)^4,x, algorithm="maxima")

[Out]

integrate((g*x + f)^2*sqrt(-x^2 + 1)/(x - 1)^4, x)

________________________________________________________________________________________

mupad [B]  time = 2.96, size = 164, normalized size = 2.05 \[ \sqrt {1-x^2}\,\left (\frac {\frac {f^2}{3}+2\,f\,g+\frac {5\,g^2}{3}}{x-1}-\frac {\frac {f^2}{3}+2\,f\,g+\frac {5\,g^2}{3}}{{\left (x-1\right )}^2}\right )-\sqrt {1-x^2}\,\left (\frac {\frac {2\,f^2}{5}+\frac {4\,f\,g}{5}+\frac {2\,g^2}{5}}{{\left (x-1\right )}^3}+\frac {\frac {4\,f^2}{15}+\frac {8\,f\,g}{15}+\frac {4\,g^2}{15}}{x-1}-\frac {\frac {4\,f^2}{15}+\frac {8\,f\,g}{15}+\frac {4\,g^2}{15}}{{\left (x-1\right )}^2}\right )-g^2\,\mathrm {asin}\relax (x)-\frac {\sqrt {1-x^2}\,\left (4\,g^2+2\,f\,g\right )}{x-1} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((f + g*x)^2*(1 - x^2)^(1/2))/(x - 1)^4,x)

[Out]

(1 - x^2)^(1/2)*((2*f*g + f^2/3 + (5*g^2)/3)/(x - 1) - (2*f*g + f^2/3 + (5*g^2)/3)/(x - 1)^2) - (1 - x^2)^(1/2
)*(((4*f*g)/5 + (2*f^2)/5 + (2*g^2)/5)/(x - 1)^3 + ((8*f*g)/15 + (4*f^2)/15 + (4*g^2)/15)/(x - 1) - ((8*f*g)/1
5 + (4*f^2)/15 + (4*g^2)/15)/(x - 1)^2) - g^2*asin(x) - ((1 - x^2)^(1/2)*(2*f*g + 4*g^2))/(x - 1)

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\sqrt {- \left (x - 1\right ) \left (x + 1\right )} \left (f + g x\right )^{2}}{\left (x - 1\right )^{4}}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((g*x+f)**2*(-x**2+1)**(1/2)/(1-x)**4,x)

[Out]

Integral(sqrt(-(x - 1)*(x + 1))*(f + g*x)**2/(x - 1)**4, x)

________________________________________________________________________________________